import {getCartList} from '../../utils/api'

export default{
    namespaced: true,
    state:{
        list:[]
    },
    mutations:{
        updateList(state,payload){
              state.list = payload
        } 
    },
    actions:{
        getCart(store,payload){
            console.log(111)
            getCartList(payload).then(arr=>{ 
                console.log(arr)
                store.commit('updateList', arr)
            })
        },
    },
}